/*
 * misc.h
 *
 * Created: 2012-06-23 16:51:19
 *  Author: Sebastian_2
 */ 


#ifndef MISC_H_
#define MISC_H_

#include "DataTypes.h"

uint8_t isInRange(uint16_t value, uint8_t rangeLow, uint8_t rangeHigh);
uint8_t isPointInRange(point *p, point *start, point *end);
uint16_t TextLength(char *c, const FONT_INFO *font);
uint16_t TextHeight(char *c, const FONT_INFO *font);
void drawInfoBar();
void drawXSeparator(point *start, uint16_t x2);
void drawXSeparator2(point *start, uint16_t x2);
void drawYSeparator(point *start, uint16_t y2);
void drawYSeparator2(point *start, uint16_t y2);
void drawFrame(point *start, point *end);
void SSD1289_ClearOmitBar();
uint16_t UTF8toASCII(char *src, char *dst, uint16_t len);
int stringArrayComparator(const void *e1, const void *e2); // for qsort
void ERROR();

#define CheckRes(); if(res != FR_OK) { ERROR();/* return;*/ }


#endif /* MISC_H_ */